import React, { Component } from 'react';
import { Col, Row } from 'antd';
import ChildPage from '../common/ChildPage';
import "./orderList.css";
class OrderList extends Component {
    getTypeClassName(type) {
        let c = ["tab-child"];
        if (this.props.orderListType === type) {
            c.push("active");
        }
        return c.join(" ");
    }
    render() {
        return (
            <ChildPage show={this.props.show} onHide={() => this.props.onHide()}>
                <div className="orderListPage">
                    <Row className="tab">
                        <Col className={this.getTypeClassName(0)} span="6" onClick={()=>this.props.updateOrderListType(0)}>
                            全部
                        </Col>
                        <Col className={this.getTypeClassName(1)} span="6" onClick={()=>this.props.updateOrderListType(1)}>
                            待付款
                        </Col>
                        <Col className={this.getTypeClassName(2)} span="6" onClick={()=>this.props.updateOrderListType(2)}>
                            待发货
                        </Col>
                        <Col className={this.getTypeClassName(3)} span="6" onClick={()=>this.props.updateOrderListType(3)}>
                            待收货
                        </Col>
                    </Row>
                </div>
            </ChildPage>
        )
    }
}
export default OrderList;